<template>
  <el-breadcrumb class="bread" separator-class="el-icon-arrow-right">
    <el-breadcrumb-item :to="{ path: item.path }" v-for="item in navs" :key="item.path">{{ item.meta.title }}</el-breadcrumb-item>
</el-breadcrumb>
</template>

<script>
export default {
  computed:{
    navs(){
      // 当前路由信息，上级路由信息
      console.log('路由信息',this.$route.matched);
      let routes=this.$route.matched
      routes[0].path='/'
      // 处理第一个路由信息

      return routes;
    }
  }
}
</script>

<style lang="less" scoped>
  .bread{
    margin-bottom: 10px;
  }
</style>